gdk: Allow querying if a GL context is in legacy mode
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 6 Oct 2015 17:54:58 +0000 (18:54 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Wed, 7 Oct 2015 15:21:57 +0000 (16:21 +0100)
commit2dfca143bb6e09d900fa186ba8ecf9bcea6ac30d
tree7eed692db6398d59c0228f495cb3aac52bd08f42
parentb23eabbd642a5d4c46a173d5324a76f4cb63c9f7
gdk: Allow querying if a GL context is in legacy mode

We want to have the ability to fall back to legacy GL contexts when
creating them. In order to do so, we need to store the legacy bit on the
GdkGLContext, as well as being able to query it.

Setting the legacy bit from outside GDK is not possible; we cannot
create GL contexts in 3.2 core profile *and* compatibility modes at the
same time, and if we allowed users to select the legacy mode themselves,
it would break the creation of the GdkWindow's paint GL context.

What we do allow is falling back to legacy GL context if the platform
does not support 3.2 core profiles — for instance, on older GPUs or
inside virtualized environments.

We are also going to use the legacy bit internally, to choose which GL
API we can use when drawing GL content.

https://bugzilla.gnome.org/show_bug.cgi?id=756142
gdk/gdkglcontext.c
gdk/gdkglcontext.h
gdk/gdkglcontextprivate.h